﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace SmartDesktop
{
    public partial class LensSelect : UserControl
    {
        public LensSelect()
        {
            InitializeComponent();
        }   
     
        private string ShowframeImage(int frameId)
        {
            string ImageSrc = "";
            try
            {
                string completePath = Application.StartupPath + @"\FrameImages\" + frameId + ".jpg";
                string completePathPNG = Application.StartupPath + @"\FrameImages\" + frameId + ".png";
                if (System.IO.File.Exists(completePathPNG))
                {
                    ImageSrc = completePathPNG;
                }
                else if (System.IO.File.Exists(completePath))
                {
                    ImageSrc = completePath;
                }
                else
                {
                    ImageSrc = @"FrameImages\noimage.jpg";
                }
            }
            catch
            {
                return @"FrameImages\noimage.jpg";
            }
            return ImageSrc;
        }
    }
}
